<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="ItemResponder,mx.collections.ItemResponder,fault,result" name="keywords">
<title>mx.collections.ItemResponder</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'ItemResponder - Zentrum virtUOS: virtPresenter';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">virtPresenter AsDoc</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?mx/collections/ItemResponder.html&amp;mx/collections/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;ItemResponder</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class ItemResponder"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mx.collections</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class ItemResponder</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="../rpc/IResponder.html">IResponder</a></td>
</tr>
</table>
<p></p>
  The ItemResponder class provides a default implementation of the
  <code>mx.rpc.IResponder</code> interface.
  It represents a responder that lets you specify methods to be 
  called when a request is completed, either successfully or with an error.
  The class object can also lets you provide data (a token) to be used by
  the responder methods.
 
 <p>You use an <code>ItemResponder</code> object in the <code>catch</code> statement
 of a try block that might result in getting remote data, as shown in the following
 code:</p>
 
  <pre><code>
     import mx.collections.ItemResponder;
     //...
      try
     {
        //...
        cursor.moveNext();
     }
    catch(e:ItemPendingError)
     {
        e.addResponder(new ItemResponder(myResultFunction, myFaultFunction, {info:"..."}));
     }
  </code></pre>
   <p>The result method specified must have the following signature:</p>
 
  <code><pre>
     public function myResultFunction(result:Object, token:Object = null):void;
  </pre></code>
   <p>The fault method specified must have the following signature:</p>
 
  <code><pre>
     public function myFaultFunction(error:Object, token:Object = null):void;
  </pre></code>
 
  <p>Any other signature will result in a runtime error.</p>
 
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="errors/ItemPendingError.html" target="">mx.collections.errors.ItemPendingError</a>
</div>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ItemResponder()">ItemResponder</a>(result:Function, fault:Function, token:Object = null)</div>
<div class="summaryTableDescription">
   Constructs an instance of the responder with the specified data and 
   handlers.</div>
</td><td class="summaryTableOwnerCol">ItemResponder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#fault()">fault</a>(info:Object):void</div>
<div class="summaryTableDescription">
   This method is called by a service when an error has been received.</div>
</td><td class="summaryTableOwnerCol">ItemResponder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#result()">result</a>(data:Object):void</div>
<div class="summaryTableDescription">
   This method is called by a service when the return value has been 
   received.</div>
</td><td class="summaryTableOwnerCol">ItemResponder</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="ItemResponder()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ItemResponder</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function ItemResponder(result:Function, fault:Function, token:Object = null)</code><p>
   Constructs an instance of the responder with the specified data and 
   handlers.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">result</span>:Function</code> &mdash; Function that should be called when the request has
           completed successfully.
     Must have the following signature:
     <code><pre>
            public function (result:Object, token:Object = null):void;
     </pre></code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">fault</span>:Function</code> &mdash; Function that should be called when the request has
    completed with errors.
     Must have the following signature:
     <code><pre>
            public function (error:ErrorMessage, token:Object = null):void;
     </pre></code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">token</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; Object [optional] additional information to associate with
           this request. This object is passed to the result and fault functions
           as their second parameter.
  </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="fault()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">fault</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function fault(info:Object):void</code><p>
   This method is called by a service when an error has been received.
     </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">info</span>:Object</code> &mdash; Object containing the information about the error that 
      occured.
  </td>
</tr>
</table>
</div>
<a name="result()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">result</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function result(data:Object):void</code><p>
   This method is called by a service when the return value has been 
   received.
     </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">data</span>:Object</code> &mdash; Object containing the information returned from the request.
  </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
